/*
========================================================================
 Name        : SPDTodayContainerLuck.cpp
 Author      : 
 Copyright   : Your copyright notice
 Description : 
========================================================================
*/
// [[[ begin generated region: do not modify [Generated System Includes]
#include <barsread.h>
#include <stringloader.h>
#include <eiklabel.h>
#include <eikenv.h>
#include <eikimage.h>
#include <aknviewappui.h>
#include <eikappui.h>
#include <akniconutils.h>
#include <lineseparator.mbg>
#include <stars.mbg>
#include <smallicons.mbg>
#include <SPD.rsg>
// ]]] end generated region [Generated System Includes]

// [[[ begin generated region: do not modify [Generated User Includes]
#include "SPDTodayContainerLuck.h"
#include "SPDTodayContainerLuckView.h"
#include "SPD.hrh"
// ]]] end generated region [Generated User Includes]

// [[[ begin generated region: do not modify [Generated Constants]
_LIT( KlineseparatorFile, "\\resource\\apps\\lineseparator.mbm" );
_LIT( KstarsFile, "\\resource\\apps\\stars.mbm" );
_LIT( KsmalliconsFile, "\\resource\\apps\\smallicons.mbm" );
// ]]] end generated region [Generated Constants]

/**
 * First phase of Symbian two-phase construction. Should not 
 * contain any code that could leave.
 */
CSPDTodayContainerLuck::CSPDTodayContainerLuck()
	{
	// [[[ begin generated region: do not modify [Generated Contents]
	iStarName = NULL;
	iDateRange = NULL;
	iOtherStarButton = NULL;
	iStartseparator1 = NULL;
	iStartIcon = NULL;
	iLoveLabel = NULL;
	iLoveIcon1 = NULL;
	iLoveIcon2 = NULL;
	iLoveIcon3 = NULL;
	iLoveIcon4 = NULL;
	iLoveIcon5 = NULL;
	iWorkLabel = NULL;
	iWorkIcon1 = NULL;
	iWorkIcon2 = NULL;
	iWorkIcon3 = NULL;
	iWorkIcon4 = NULL;
	iWorkIcon5 = NULL;
	iLuckLabel = NULL;
	iLuckIcon1 = NULL;
	iLuckIcon2 = NULL;
	iLuckIcon3 = NULL;
	iLuckIcon4 = NULL;
	iLuckIcon5 = NULL;
	iStarseparator2 = NULL;
	iStarDesc = NULL;
	// ]]] end generated region [Generated Contents]
	
	}
/** 
 * Destroy child controls.
 */
CSPDTodayContainerLuck::~CSPDTodayContainerLuck()
	{
	// [[[ begin generated region: do not modify [Generated Contents]
	delete iStarName;
	iStarName = NULL;
	delete iDateRange;
	iDateRange = NULL;
	delete iOtherStarButton;
	iOtherStarButton = NULL;
	delete iStartseparator1;
	iStartseparator1 = NULL;
	delete iStartIcon;
	iStartIcon = NULL;
	delete iLoveLabel;
	iLoveLabel = NULL;
	delete iLoveIcon1;
	iLoveIcon1 = NULL;
	delete iLoveIcon2;
	iLoveIcon2 = NULL;
	delete iLoveIcon3;
	iLoveIcon3 = NULL;
	delete iLoveIcon4;
	iLoveIcon4 = NULL;
	delete iLoveIcon5;
	iLoveIcon5 = NULL;
	delete iWorkLabel;
	iWorkLabel = NULL;
	delete iWorkIcon1;
	iWorkIcon1 = NULL;
	delete iWorkIcon2;
	iWorkIcon2 = NULL;
	delete iWorkIcon3;
	iWorkIcon3 = NULL;
	delete iWorkIcon4;
	iWorkIcon4 = NULL;
	delete iWorkIcon5;
	iWorkIcon5 = NULL;
	delete iLuckLabel;
	iLuckLabel = NULL;
	delete iLuckIcon1;
	iLuckIcon1 = NULL;
	delete iLuckIcon2;
	iLuckIcon2 = NULL;
	delete iLuckIcon3;
	iLuckIcon3 = NULL;
	delete iLuckIcon4;
	iLuckIcon4 = NULL;
	delete iLuckIcon5;
	iLuckIcon5 = NULL;
	delete iStarseparator2;
	iStarseparator2 = NULL;
	delete iStarDesc;
	iStarDesc = NULL;
	// ]]] end generated region [Generated Contents]
	
	}
				
/**
 * Construct the control (first phase).
 *  Creates an instance and initializes it.
 *  Instance is not left on cleanup stack.
 * @param aRect bounding rectangle
 * @param aParent owning parent, or NULL
 * @param aCommandObserver command observer
 * @return initialized instance of CSPDTodayContainerLuck
 */
CSPDTodayContainerLuck* CSPDTodayContainerLuck::NewL( 
		const TRect& aRect, 
		const CCoeControl* aParent, 
		MEikCommandObserver* aCommandObserver )
	{
	CSPDTodayContainerLuck* self = CSPDTodayContainerLuck::NewLC( 
			aRect, 
			aParent, 
			aCommandObserver );
	CleanupStack::Pop( self );
	return self;
	}

/**
 * Construct the control (first phase).
 *  Creates an instance and initializes it.
 *  Instance is left on cleanup stack.
 * @param aRect The rectangle for this window
 * @param aParent owning parent, or NULL
 * @param aCommandObserver command observer
 * @return new instance of CSPDTodayContainerLuck
 */
CSPDTodayContainerLuck* CSPDTodayContainerLuck::NewLC( 
		const TRect& aRect, 
		const CCoeControl* aParent, 
		MEikCommandObserver* aCommandObserver )
	{
	CSPDTodayContainerLuck* self = new ( ELeave ) CSPDTodayContainerLuck();
	CleanupStack::PushL( self );
	self->ConstructL( aRect, aParent, aCommandObserver );
	return self;
	}
			
/**
 * Construct the control (second phase).
 *  Creates a window to contain the controls and activates it.
 * @param aRect bounding rectangle
 * @param aCommandObserver command observer
 * @param aParent owning parent, or NULL
 */ 
void CSPDTodayContainerLuck::ConstructL( 
		const TRect& aRect, 
		const CCoeControl* aParent, 
		MEikCommandObserver* aCommandObserver )
	{
	if ( aParent == NULL )
	    {
		CreateWindowL();
	    }
	else
	    {
	    SetContainerWindowL( *aParent );
	    }
	iFocusControl = NULL;
	iCommandObserver = aCommandObserver;
	InitializeControlsL();
	SetRect( aRect );
	ActivateL();
	// [[[ begin generated region: do not modify [Post-ActivateL initializations]
	// ]]] end generated region [Post-ActivateL initializations]
	
	}
			
/**
* Return the number of controls in the container (override)
* @return count
*/
TInt CSPDTodayContainerLuck::CountComponentControls() const
	{
	return ( int ) ELastControl;
	}
				
/**
* Get the control with the given index (override)
* @param aIndex Control index [0...n) (limited by #CountComponentControls)
* @return Pointer to control
*/
CCoeControl* CSPDTodayContainerLuck::ComponentControl( TInt aIndex ) const
	{
	// [[[ begin generated region: do not modify [Generated Contents]
	switch ( aIndex )
		{
		case EStarName:
			return iStarName;
		case EDateRange:
			return iDateRange;
		case EOtherStarButton:
			return iOtherStarButton;
		case EStartseparator1:
			return iStartseparator1;
		case EStartIcon:
			return iStartIcon;
		case ELoveLabel:
			return iLoveLabel;
		case ELoveIcon1:
			return iLoveIcon1;
		case ELoveIcon2:
			return iLoveIcon2;
		case ELoveIcon3:
			return iLoveIcon3;
		case ELoveIcon4:
			return iLoveIcon4;
		case ELoveIcon5:
			return iLoveIcon5;
		case EWorkLabel:
			return iWorkLabel;
		case EWorkIcon1:
			return iWorkIcon1;
		case EWorkIcon2:
			return iWorkIcon2;
		case EWorkIcon3:
			return iWorkIcon3;
		case EWorkIcon4:
			return iWorkIcon4;
		case EWorkIcon5:
			return iWorkIcon5;
		case ELuckLabel:
			return iLuckLabel;
		case ELuckIcon1:
			return iLuckIcon1;
		case ELuckIcon2:
			return iLuckIcon2;
		case ELuckIcon3:
			return iLuckIcon3;
		case ELuckIcon4:
			return iLuckIcon4;
		case ELuckIcon5:
			return iLuckIcon5;
		case EStarseparator2:
			return iStarseparator2;
		case EStarDesc:
			return iStarDesc;
		}
	// ]]] end generated region [Generated Contents]
	
	// handle any user controls here...
	
	return NULL;
	}
				
/**
 *	Handle resizing of the container. This implementation will lay out
 *  full-sized controls like list boxes for any screen size, and will layout
 *  labels, editors, etc. to the size they were given in the UI designer.
 *  This code will need to be modified to adjust arbitrary controls to
 *  any screen size.
 */				
void CSPDTodayContainerLuck::SizeChanged()
	{
	CCoeControl::SizeChanged();
	LayoutControls();
	// [[[ begin generated region: do not modify [Generated Contents]
			
	// ]]] end generated region [Generated Contents]
	
	}
				
// [[[ begin generated function: do not modify
/**
 * Layout components as specified in the UI Designer
 */
void CSPDTodayContainerLuck::LayoutControls()
	{
	iStarName->SetExtent( TPoint( 63, 30 ), TSize( 80, 34 ) );
	iDateRange->SetExtent( TPoint( 38, 69 ), TSize( 145, 27 ) );
	iStartseparator1->SetExtent( TPoint( 20, 120 ), TSize( 320, 2 ) );
	iStartIcon->SetExtent( TPoint( 241, 143 ), TSize( 100, 100 ) );
	iLoveLabel->SetExtent( TPoint( 14, 143 ), TSize( 40, 27 ) );
	iLoveIcon1->SetExtent( TPoint( 50, 140 ), TSize( 30, 30 ) );
	iLoveIcon2->SetExtent( TPoint( 80, 140 ), TSize( 30, 30 ) );
	iLoveIcon3->SetExtent( TPoint( 110, 140 ), TSize( 30, 30 ) );
	iLoveIcon4->SetExtent( TPoint( 140, 140 ), TSize( 30, 30 ) );
	iLoveIcon5->SetExtent( TPoint( 170, 140 ), TSize( 30, 30 ) );
	iWorkLabel->SetExtent( TPoint( 14, 175 ), TSize( 40, 27 ) );
	iWorkIcon1->SetExtent( TPoint( 50, 175 ), TSize( 30, 30 ) );
	iWorkIcon2->SetExtent( TPoint( 80, 175 ), TSize( 30, 30 ) );
	iWorkIcon3->SetExtent( TPoint( 110, 175 ), TSize( 30, 30 ) );
	iWorkIcon4->SetExtent( TPoint( 140, 175 ), TSize( 30, 30 ) );
	iWorkIcon5->SetExtent( TPoint( 170, 175 ), TSize( 30, 30 ) );
	iLuckLabel->SetExtent( TPoint( 14, 213 ), TSize( 40, 27 ) );
	iLuckIcon1->SetExtent( TPoint( 50, 213 ), TSize( 30, 30 ) );
	iLuckIcon2->SetExtent( TPoint( 80, 213 ), TSize( 30, 30 ) );
	iLuckIcon3->SetExtent( TPoint( 110, 213 ), TSize( 30, 30 ) );
	iLuckIcon4->SetExtent( TPoint( 140, 213 ), TSize( 30, 30 ) );
	iLuckIcon5->SetExtent( TPoint( 170, 213 ), TSize( 30, 30 ) );
	iStarseparator2->SetExtent( TPoint( 20, 270 ), TSize( 320, 2 ) );
	iStarDesc->SetExtent( TPoint( 18, 287 ), TSize( 327, 184 ) );
	}
// ]]] end generated function

/**
 *	Handle key events.
 */				
TKeyResponse CSPDTodayContainerLuck::OfferKeyEventL( 
		const TKeyEvent& aKeyEvent, 
		TEventCode aType )
	{
	// [[[ begin generated region: do not modify [Generated Contents]
	
	// ]]] end generated region [Generated Contents]
	
	if ( iFocusControl != NULL
		&& iFocusControl->OfferKeyEventL( aKeyEvent, aType ) == EKeyWasConsumed )
		{
		return EKeyWasConsumed;
		}
	return CCoeControl::OfferKeyEventL( aKeyEvent, aType );
	}
				
// [[[ begin generated function: do not modify
/**
 *	Initialize each control upon creation.
 */				
void CSPDTodayContainerLuck::InitializeControlsL()
	{
	iStarName = new ( ELeave ) CEikLabel;
	iStarName->SetContainerWindowL( *this );
		{
		TResourceReader reader;
		iEikonEnv->CreateResourceReaderLC( reader, R_SPDTODAY_CONTAINER_LUCK_STAR_NAME );
		iStarName->ConstructFromResourceL( reader );
		CleanupStack::PopAndDestroy(); // reader internal state
		}
	iDateRange = new ( ELeave ) CEikLabel;
	iDateRange->SetContainerWindowL( *this );
		{
		TResourceReader reader;
		iEikonEnv->CreateResourceReaderLC( reader, R_SPDTODAY_CONTAINER_LUCK_DATE_RANGE );
		iDateRange->ConstructFromResourceL( reader );
		CleanupStack::PopAndDestroy(); // reader internal state
		}
	
	iOtherStarButton = static_cast< CAknButton* >
					( EikControlFactory::CreateByTypeL( EAknCtButton ).iControl );
	iOtherStarButton->ConstructFromResourceL ( R_SPDTODAY_CONTAINER_LUCK_OTHER_STAR_BUTTON );
	
	iOtherStarButton->SetContainerWindowL ( *this );
	iOtherStarButton->SetRect ( TRect ( 
								TPoint ( 210, 43 ) , 
								TSize ( 106, 34 ) )  
								 ) ; 
	iOtherStarButton->SetObserver( ( MCoeControlObserver* ) iCommandObserver ); 
	
	
	
	
	
	
	iStartseparator1 = new ( ELeave ) CEikImage;
		{
		CFbsBitmap *bitmap, *mask;
		AknIconUtils::CreateIconL( bitmap, mask,
				KlineseparatorFile, EMbmLineseparatorLine01, EMbmLineseparatorLine01_mask );
		AknIconUtils::SetSize( bitmap, TSize( 320, 2 ), EAspectRatioPreserved );
		AknIconUtils::SetSize( mask, TSize( 320, 2 ), EAspectRatioPreserved );
		iStartseparator1->SetPicture( bitmap, mask );
		}
	iStartseparator1->SetAlignment( EHCenterVTop );
	iStartIcon = new ( ELeave ) CEikImage;
		{
		CFbsBitmap *bitmap, *mask;
		AknIconUtils::CreateIconL( bitmap, mask,
				KstarsFile, EMbmStarsXingzuo4, EMbmStarsXingzuo4_mask );
		AknIconUtils::SetSize( bitmap, TSize( 100, 100 ), EAspectRatioPreserved );
		AknIconUtils::SetSize( mask, TSize( 100, 100 ), EAspectRatioPreserved );
		iStartIcon->SetPicture( bitmap, mask );
		}
	iStartIcon->SetAlignment( EHCenterVTop );
	iLoveLabel = new ( ELeave ) CEikLabel;
	iLoveLabel->SetContainerWindowL( *this );
		{
		TResourceReader reader;
		iEikonEnv->CreateResourceReaderLC( reader, R_SPDTODAY_CONTAINER_LUCK_LOVE_LABEL );
		iLoveLabel->ConstructFromResourceL( reader );
		CleanupStack::PopAndDestroy(); // reader internal state
		}
	iLoveIcon1 = new ( ELeave ) CEikImage;
		{
		CFbsBitmap *bitmap, *mask;
		AknIconUtils::CreateIconL( bitmap, mask,
				KsmalliconsFile, EMbmSmalliconsStar, EMbmSmalliconsStar_mask );
		AknIconUtils::SetSize( bitmap, TSize( 30, 30 ), EAspectRatioPreserved );
		AknIconUtils::SetSize( mask, TSize( 30, 30 ), EAspectRatioPreserved );
		iLoveIcon1->SetPicture( bitmap, mask );
		}
	iLoveIcon1->SetAlignment( EHCenterVTop );
	iLoveIcon2 = new ( ELeave ) CEikImage;
		{
		CFbsBitmap *bitmap, *mask;
		AknIconUtils::CreateIconL( bitmap, mask,
				KsmalliconsFile, EMbmSmalliconsStar, EMbmSmalliconsStar_mask );
		AknIconUtils::SetSize( bitmap, TSize( 30, 30 ), EAspectRatioPreserved );
		AknIconUtils::SetSize( mask, TSize( 30, 30 ), EAspectRatioPreserved );
		iLoveIcon2->SetPicture( bitmap, mask );
		}
	iLoveIcon2->SetAlignment( EHCenterVTop );
	iLoveIcon3 = new ( ELeave ) CEikImage;
		{
		CFbsBitmap *bitmap, *mask;
		AknIconUtils::CreateIconL( bitmap, mask,
				KsmalliconsFile, EMbmSmalliconsStar, EMbmSmalliconsStar_mask );
		AknIconUtils::SetSize( bitmap, TSize( 30, 30 ), EAspectRatioPreserved );
		AknIconUtils::SetSize( mask, TSize( 30, 30 ), EAspectRatioPreserved );
		iLoveIcon3->SetPicture( bitmap, mask );
		}
	iLoveIcon3->SetAlignment( EHCenterVTop );
	iLoveIcon4 = new ( ELeave ) CEikImage;
		{
		CFbsBitmap *bitmap, *mask;
		AknIconUtils::CreateIconL( bitmap, mask,
				KsmalliconsFile, EMbmSmalliconsStar, EMbmSmalliconsStar_mask );
		AknIconUtils::SetSize( bitmap, TSize( 30, 30 ), EAspectRatioPreserved );
		AknIconUtils::SetSize( mask, TSize( 30, 30 ), EAspectRatioPreserved );
		iLoveIcon4->SetPicture( bitmap, mask );
		}
	iLoveIcon4->SetAlignment( EHCenterVTop );
	iLoveIcon5 = new ( ELeave ) CEikImage;
		{
		CFbsBitmap *bitmap, *mask;
		AknIconUtils::CreateIconL( bitmap, mask,
				KsmalliconsFile, EMbmSmalliconsHalfstar, EMbmSmalliconsHalfstar_mask );
		AknIconUtils::SetSize( bitmap, TSize( 30, 30 ), EAspectRatioPreserved );
		AknIconUtils::SetSize( mask, TSize( 30, 30 ), EAspectRatioPreserved );
		iLoveIcon5->SetPicture( bitmap, mask );
		}
	iLoveIcon5->SetAlignment( EHCenterVTop );
	iWorkLabel = new ( ELeave ) CEikLabel;
	iWorkLabel->SetContainerWindowL( *this );
		{
		TResourceReader reader;
		iEikonEnv->CreateResourceReaderLC( reader, R_SPDTODAY_CONTAINER_LUCK_WORK_LABEL );
		iWorkLabel->ConstructFromResourceL( reader );
		CleanupStack::PopAndDestroy(); // reader internal state
		}
	iWorkIcon1 = new ( ELeave ) CEikImage;
		{
		CFbsBitmap *bitmap, *mask;
		AknIconUtils::CreateIconL( bitmap, mask,
				KsmalliconsFile, EMbmSmalliconsStar, EMbmSmalliconsStar_mask );
		AknIconUtils::SetSize( bitmap, TSize( 30, 30 ), EAspectRatioPreserved );
		AknIconUtils::SetSize( mask, TSize( 30, 30 ), EAspectRatioPreserved );
		iWorkIcon1->SetPicture( bitmap, mask );
		}
	iWorkIcon1->SetAlignment( EHCenterVTop );
	iWorkIcon2 = new ( ELeave ) CEikImage;
		{
		CFbsBitmap *bitmap, *mask;
		AknIconUtils::CreateIconL( bitmap, mask,
				KsmalliconsFile, EMbmSmalliconsStar, EMbmSmalliconsStar_mask );
		AknIconUtils::SetSize( bitmap, TSize( 30, 30 ), EAspectRatioPreserved );
		AknIconUtils::SetSize( mask, TSize( 30, 30 ), EAspectRatioPreserved );
		iWorkIcon2->SetPicture( bitmap, mask );
		}
	iWorkIcon2->SetAlignment( EHCenterVTop );
	iWorkIcon3 = new ( ELeave ) CEikImage;
		{
		CFbsBitmap *bitmap, *mask;
		AknIconUtils::CreateIconL( bitmap, mask,
				KsmalliconsFile, EMbmSmalliconsStar, EMbmSmalliconsStar_mask );
		AknIconUtils::SetSize( bitmap, TSize( 30, 30 ), EAspectRatioPreserved );
		AknIconUtils::SetSize( mask, TSize( 30, 30 ), EAspectRatioPreserved );
		iWorkIcon3->SetPicture( bitmap, mask );
		}
	iWorkIcon3->SetAlignment( EHCenterVTop );
	iWorkIcon4 = new ( ELeave ) CEikImage;
		{
		CFbsBitmap *bitmap, *mask;
		AknIconUtils::CreateIconL( bitmap, mask,
				KsmalliconsFile, EMbmSmalliconsStar, EMbmSmalliconsStar_mask );
		AknIconUtils::SetSize( bitmap, TSize( 30, 30 ), EAspectRatioPreserved );
		AknIconUtils::SetSize( mask, TSize( 30, 30 ), EAspectRatioPreserved );
		iWorkIcon4->SetPicture( bitmap, mask );
		}
	iWorkIcon4->SetAlignment( EHCenterVTop );
	iWorkIcon5 = new ( ELeave ) CEikImage;
		{
		CFbsBitmap *bitmap, *mask;
		AknIconUtils::CreateIconL( bitmap, mask,
				KsmalliconsFile, EMbmSmalliconsHalfstar, EMbmSmalliconsHalfstar_mask );
		AknIconUtils::SetSize( bitmap, TSize( 30, 30 ), EAspectRatioPreserved );
		AknIconUtils::SetSize( mask, TSize( 30, 30 ), EAspectRatioPreserved );
		iWorkIcon5->SetPicture( bitmap, mask );
		}
	iWorkIcon5->SetAlignment( EHCenterVTop );
	iLuckLabel = new ( ELeave ) CEikLabel;
	iLuckLabel->SetContainerWindowL( *this );
		{
		TResourceReader reader;
		iEikonEnv->CreateResourceReaderLC( reader, R_SPDTODAY_CONTAINER_LUCK_LUCK_LABEL );
		iLuckLabel->ConstructFromResourceL( reader );
		CleanupStack::PopAndDestroy(); // reader internal state
		}
	iLuckIcon1 = new ( ELeave ) CEikImage;
		{
		CFbsBitmap *bitmap, *mask;
		AknIconUtils::CreateIconL( bitmap, mask,
				KsmalliconsFile, EMbmSmalliconsStar, EMbmSmalliconsStar_mask );
		AknIconUtils::SetSize( bitmap, TSize( 30, 30 ), EAspectRatioPreserved );
		AknIconUtils::SetSize( mask, TSize( 30, 30 ), EAspectRatioPreserved );
		iLuckIcon1->SetPicture( bitmap, mask );
		}
	iLuckIcon1->SetAlignment( EHCenterVTop );
	iLuckIcon2 = new ( ELeave ) CEikImage;
		{
		CFbsBitmap *bitmap, *mask;
		AknIconUtils::CreateIconL( bitmap, mask,
				KsmalliconsFile, EMbmSmalliconsStar, EMbmSmalliconsStar_mask );
		AknIconUtils::SetSize( bitmap, TSize( 30, 30 ), EAspectRatioPreserved );
		AknIconUtils::SetSize( mask, TSize( 30, 30 ), EAspectRatioPreserved );
		iLuckIcon2->SetPicture( bitmap, mask );
		}
	iLuckIcon2->SetAlignment( EHCenterVTop );
	iLuckIcon3 = new ( ELeave ) CEikImage;
		{
		CFbsBitmap *bitmap, *mask;
		AknIconUtils::CreateIconL( bitmap, mask,
				KsmalliconsFile, EMbmSmalliconsStar, EMbmSmalliconsStar_mask );
		AknIconUtils::SetSize( bitmap, TSize( 30, 30 ), EAspectRatioPreserved );
		AknIconUtils::SetSize( mask, TSize( 30, 30 ), EAspectRatioPreserved );
		iLuckIcon3->SetPicture( bitmap, mask );
		}
	iLuckIcon3->SetAlignment( EHCenterVTop );
	iLuckIcon4 = new ( ELeave ) CEikImage;
		{
		CFbsBitmap *bitmap, *mask;
		AknIconUtils::CreateIconL( bitmap, mask,
				KsmalliconsFile, EMbmSmalliconsStar, EMbmSmalliconsStar_mask );
		AknIconUtils::SetSize( bitmap, TSize( 30, 30 ), EAspectRatioPreserved );
		AknIconUtils::SetSize( mask, TSize( 30, 30 ), EAspectRatioPreserved );
		iLuckIcon4->SetPicture( bitmap, mask );
		}
	iLuckIcon4->SetAlignment( EHCenterVTop );
	iLuckIcon5 = new ( ELeave ) CEikImage;
		{
		CFbsBitmap *bitmap, *mask;
		AknIconUtils::CreateIconL( bitmap, mask,
				KsmalliconsFile, EMbmSmalliconsStar, EMbmSmalliconsStar_mask );
		AknIconUtils::SetSize( bitmap, TSize( 30, 30 ), EAspectRatioPreserved );
		AknIconUtils::SetSize( mask, TSize( 30, 30 ), EAspectRatioPreserved );
		iLuckIcon5->SetPicture( bitmap, mask );
		}
	iLuckIcon5->SetAlignment( EHCenterVTop );
	iStarseparator2 = new ( ELeave ) CEikImage;
		{
		CFbsBitmap *bitmap, *mask;
		AknIconUtils::CreateIconL( bitmap, mask,
				KlineseparatorFile, EMbmLineseparatorLine01, EMbmLineseparatorLine01_mask );
		AknIconUtils::SetSize( bitmap, TSize( 320, 2 ), EAspectRatioPreserved );
		AknIconUtils::SetSize( mask, TSize( 320, 2 ), EAspectRatioPreserved );
		iStarseparator2->SetPicture( bitmap, mask );
		}
	iStarseparator2->SetAlignment( EHCenterVTop );
	iStarDesc = new ( ELeave ) CEikLabel;
	iStarDesc->SetContainerWindowL( *this );
		{
		TResourceReader reader;
		iEikonEnv->CreateResourceReaderLC( reader, R_SPDTODAY_CONTAINER_LUCK_STAR_DESC );
		iStarDesc->ConstructFromResourceL( reader );
		CleanupStack::PopAndDestroy(); // reader internal state
		}
	
	iOtherStarButton->SetFocus( ETrue );
	iFocusControl = iOtherStarButton;
	
	}
// ]]] end generated function

/** 
 * Handle global resource changes, such as scalable UI or skin events (override)
 */
void CSPDTodayContainerLuck::HandleResourceChange( TInt aType )
	{
	CCoeControl::HandleResourceChange( aType );
	SetRect( iAvkonViewAppUi->View( TUid::Uid( ESPDTodayContainerLuckViewId ) )->ClientRect() );
	// [[[ begin generated region: do not modify [Generated Contents]
	// ]]] end generated region [Generated Contents]
	
	}
				
/**
 *	Draw container contents.
 */				
void CSPDTodayContainerLuck::Draw( const TRect& aRect ) const
	{
	// [[[ begin generated region: do not modify [Generated Contents]
	CWindowGc& gc = SystemGc();
	gc.SetPenStyle( CGraphicsContext::ENullPen );
	TRgb backColor( 214,227,250 );
	gc.SetBrushColor( backColor );
	gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
	gc.DrawRect( aRect );
	
	// ]]] end generated region [Generated Contents]
	
	}
				
